﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:schemas-yoda-masters-org">
  <xs:element name="set">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="playerlist">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="4" minOccurs="4" name="player">
                <xs:complexType id="player">
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="order" type="xs:integer" default="1"/>
                      <xs:attribute name="serving" type="xs:boolean" default="false"  />
                      <xs:attribute name="aces" type="xs:integer" default="0" />
                      <xs:attribute name="double-faults" type="xs:integer" default="0"  />
                      <xs:attribute name="first-serve-success" type="xs:integer" default="0"  />
                      <xs:attribute name="second-serve-success" type="xs:integer" default="0" />
                      <xs:attribute name="first-serve-percent" type="xs:integer" default="0"  />
                      <xs:attribute name="winners" type="xs:integer" default="0"  />
                      <xs:attribute name="unforced-errors" type="xs:integer" default="0"  />
                      <xs:attribute name="net-point-win" type="xs:integer" default="0"  />
                      <xs:attribute name="net-point-lost" type="xs:integer" default="0" />
                      <xs:attribute name="net-point-percent" type="xs:integer" default="0" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="doubles">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="2" minOccurs="2" name="double">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="order" type="xs:integer"  default="1"/>
                      <xs:attribute name="games" type="xs:integer"  default="0" />
                      <xs:attribute name="point" type="xs:string"  default="0" />
                      <xs:attribute name="sum-point" type="xs:integer"  default="0" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  
  <xs:attribute name="SetPointNo">
    <xs:simpleType>
      <xs:restriction base="xs:integer" >
        <xs:minInclusive value="0"></xs:minInclusive>
        <xs:maxInclusive value="7"></xs:maxInclusive>
      </xs:restriction>      
    </xs:simpleType>
  </xs:attribute>

</xs:schema>